Vectorize I_nm/I_mk coupling integrals and remove per-element assembly loops#99
Draft
rebeccamccabe with Copilot wants to merge 1 commit into
Draft
Vectorize I_nm/I_mk coupling integrals and remove per-element assembly loops#99rebeccamccabe with Copilot wants to merge 1 commit into
I_nm/I_mk coupling integrals and remove per-element assembly loops#99rebeccamccabe with Copilot wants to merge 1 commit into
Conversation
Copilot created this pull request from a session on behalf of
rebeccamccabe
July 21, 2026 07:55
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I_nmandI_mkwere scalar/branch-oriented and required nested Python loops in matrix assembly, limiting performance and making fast-path formulas harder to apply selectively. This change makes both integrals array-native and applies case-specific formulas via mask-based indexing so expensive/general formulas run only where required.Vectorized coupling APIs (
multi_equations.py)I_nmandI_mkto compute with logical masks for:Assembly/cache integration (
meem_engine.py)(n,m)precompute loops forI_nmwith a single vectorized call over mode grids.(m,k)closure loop forI_mkwith a single vectorized call, preserving existing cache interfaces and downstream block assembly behavior.Illustrative usage